<?

session_start();

require("../../classCol.php");
require("../../helpers/html.php");
require("../models/fetchers.php");

$COracle = new oracleDb;
$COracle->init($_SESSION["ORCL"], 
               $_SESSION["OPASS"],
               $_SESSION["SID"],
               _NO_COMMENT);

$srcDbGroup = "MST_MODEL_UNIT";
   
if($COracle->connect()){
  
  fetchQtyConvertion($COracle,
                     $_POST["srcFrom"],
                     $_POST["srcTo"],
                     $srcDbGroup,
                     $qtyConvertion);
                
  $retVal = $_POST["srcQuantity"] / $qtyConvertion;
    
  echo  $retVal;
  
  $COracle->dc();
}else{
  
  return "****";
}

?>